﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    /// <summary>
    /// 列信息
    /// </summary>
    [SugarTable("DbTableFieldEntity")]
    public class DbTableFieldEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        ///// <summary>
        ///// 表名
        ///// </summary>
        //public string TableName { get; set; }
        /// <summary>
        /// 表Id
        /// </summary>
        public int TableId { get; set; }
        /// <summary>
        /// 字段名称
        /// </summary>
        public string DbFieldName { get; set; }
        /// <summary>
        /// 属性名
        /// </summary>
        public string PropertyName { get; set; }
        /// <summary>
        /// 数据库数据类型
        /// </summary>
        public string DataType { get; set; }
        /// <summary>
        /// 属性类型
        /// </summary>
        public String PropertyType { get; set; }
        /// <summary>
        /// 长度
        /// </summary>
        public int Length { get; set; }
        /// <summary>
        /// 字段注释
        /// </summary>
        public string FieldDescription { get; set; }
        /// <summary>
        /// 默认值
        /// </summary>
        public string DefaultValue { get; set; }
        /// <summary>
        /// 是否可以为空
        /// </summary>
        public bool IsNullable { get; set; }
        /// <summary>
        /// 是否自增
        /// </summary>
        public bool IsIdentity { get; set; }
        /// <summary>
        /// 是否是主键
        /// </summary>
        public bool IsPrimarykey { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public String Value { get; set; }
        /// <summary>
        /// 小数位数
        /// </summary>
        public int DecimalDigits { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int Scale { get; set; }
    }
}
